home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Developer's Kit 1996
/
Delphi Developer's Kit 1996.iso
/
power
/
reswatch
/
reswatch.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-12-22
|
1KB
|
60 lines
unit ResWatch;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, ExtCtrls, StdCtrls, Gauges, Buttons;
type
TRWMain = class(TForm)
RWMainPanel: TPanel;
SystemLabel: TLabel;
GDILabel: TLabel;
UserLabel: TLabel;
FreeMemLabel: TLabel;
FreeMemSize: TLabel;
ResourceTimer: TTimer;
UserPanel: TPanel;
UserGauge: TGauge;
GDIPanel: TPanel;
GDIGauge: TGauge;
SystemPanel: TPanel;
SystemGauge: TGauge;
ExitButton: TSpeedButton;
procedure ResourceTimerTimer(Sender: TObject);
procedure ExitButtonClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
RWMain: TRWMain;
implementation
{$R *.DFM}
procedure TRWMain.ResourceTimerTimer(Sender: TObject);
begin
UserGauge.Progress := GetFreeSystemResources(GFSR_UserResources);
GDIGauge.Progress := GetFreeSystemResources(GFSR_GDIResources);
SystemGauge.Progress := GetFreeSystemResources(GFSR_SystemResources);
FreeMemSize.Caption := IntToStr(GetFreeSpace(0))+' bytes';
end;
procedure TRWMain.ExitButtonClick(Sender: TObject);
begin
Close;
end;
procedure TRWMain.FormCreate(Sender: TObject);
begin
Application.HintColor := clAqua;
Application.HintPause := 0;
end;
end.